﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$DefaultDbConnection$" formatter="bizobjlist of Contact">
	<Sql>
	    SELECT id 
		<code><![CDATA[
			DetailLevel details = (DetailLevel)info.get("listDetailLevel");
			if(details > DetailLevel.idOnly)
				sql.Append(",lastName,firstName	,middleName,phone,mobile,email,isUser,typeId,companyId ");
		  ]]></code>
		FROM Contacts
		WHERE companyId=@companyId
	</Sql>
	<Param name="companyId" type="UniqueIdentifier" />
</AdoNetDataAccess>